package com.yjd.comm.statistics.service;

import java.util.List;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.statistics.dto.StatisticsDto;
import com.yjd.comm.statistics.model.WalFundsStatisticsModel;

/**
 * <b>description</b>：小钱包资金统计业务接口<br>
 * <b>time</b>：2015-12-22 10:41:29 <br>
 * <b>author</b>： ready zhoujin@yijiedai.com
 */
public interface IWalFundsStatisticsService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public WalFundsStatisticsModel insert(WalFundsStatisticsModel model)
			throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(WalFundsStatisticsModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	/**
	 * 初始化每一天的统计
	 * 
	 * @param dateList
	 * @throws Exception
	 *             void
	 */
	public void statistics(List<Long> dateList) throws Exception;

	/**
	 * 统计某一天的小钱包资金数据
	 * 
	 * @param datetime
	 * @throws Exception
	 *             void
	 */
	public void statistics(WalFundsStatisticsModel model) throws Exception;

	/**
	 * 统计单日资金情况
	 * 
	 * @param statistics_time
	 * @return
	 * @throws Exception
	 *             StatisticsDto
	 */
	public StatisticsDto statistics(Long statistics_start, Long statistics_end)
			throws Exception;

	/**
	 * 获取最后一次统计的数据
	 * 
	 * @return
	 * @throws Exception
	 *             WalFundsStatisticsModel
	 */
	public WalFundsStatisticsModel getLastModel() throws Exception;

}
